/**  

* @Title: Image.java 

* @Package com.gxbadge.model 

* @Description: TODO(用一句话描述该文件做什么) 

* @author CST

* @version V1.0  

*/ 

package com.gxbadge.model;

import java.io.Serializable;
import java.sql.Timestamp;

public class Image implements Serializable {
	
	private static final long serialVersionUID = -8911849687522882774L;
	private Integer imageId;
	private String imageSaveName;
	private String imageSavePath;
	private String imageUrl;
	private String note;
	private Boolean hotFlag;
	private Boolean deleteFlag;
	private Timestamp uploadDate;
	private Navigation nav;
	private Article arti;
	public Integer getImageId() {
		return imageId;
	}
	public void setImageId(Integer imageId) {
		this.imageId = imageId;
	}
	
	public String getImageSaveName() {
		return imageSaveName;
	}
	public void setImageSaveName(String imageSaveName) {
		this.imageSaveName = imageSaveName;
	}
	public String getImageSavePath() {
		return imageSavePath;
	}
	public void setImageSavePath(String imageSavePath) {
		this.imageSavePath = imageSavePath;
	}
	public String getImageUrl() {
		return imageUrl;
	}
	public void setImageUrl(String imageUrl) {
		this.imageUrl = imageUrl;
	}
	public Boolean getHotFlag() {
		return hotFlag;
	}
	public void setHotFlag(Boolean hotFlag) {
		this.hotFlag = hotFlag;
	}
	
	public String getNote() {
		return note;
	}
	public void setNote(String note) {
		this.note = note;
	}
	public Boolean getDeleteFlag() {
		return deleteFlag;
	}
	public void setDeleteFlag(Boolean deleteFlag) {
		this.deleteFlag = deleteFlag;
	}
	public Timestamp getUploadDate() {
		return uploadDate;
	}
	public void setUploadDate(Timestamp uploadDate) {
		this.uploadDate = uploadDate;
	}
	public Navigation getNav() {
		return nav;
	}
	public void setNav(Navigation nav) {
		this.nav = nav;
	}
	public Article getArti() {
		return arti;
	}
	public void setArti(Article arti) {
		this.arti = arti;
	}
	public Image(){
		
	}
	public Image(Integer imageId, String imageSaveName,
			String imageSavePath, String imageUrl, String note,
			Boolean hotFlag, Boolean deleteFlag, Timestamp uploadDate,
			Navigation nav, Article arti) {
		super();
		this.imageId = imageId;
		this.imageSaveName = imageSaveName;
		this.imageSavePath = imageSavePath;
		this.imageUrl = imageUrl;;
		this.note = note;
		this.hotFlag = hotFlag;
		this.deleteFlag = deleteFlag;
		this.uploadDate = uploadDate;
		this.nav = nav;
		this.arti = arti;
	}
	public boolean equals(Object obj){
		
		if (this == obj){
			return true;
		}
		if (obj != null && obj.getClass() == Image.class){
			Image image = (Image)obj;
			return this.getImageId().equals(image.getImageId()) && this.getImageSaveName().equals(image.getImageSaveName())
				&& this.getUploadDate().equals(image.getUploadDate());
		}
		return false;

	}
	
	public int hashcode(){
		
		return this.getImageId().hashCode() + this.getImageSaveName().hashCode() +this.getUploadDate()
			.hashCode();
		
	}
	
	public String toString(){
		
		return this.getImageId().toString() + this.getImageSaveName().toString() + this.getUploadDate().toString();

	}
}
